#!/usr/bin/env bash
. $(dirname "$0")/common.sh

set -eux

mkdir -p $TARGET
mkdir -p $BASH_COMPLETION_D

if [ $# -ge 1 ]; then
	for pkg in "$@"; do
		case $pkg in
			fzf) install_fzf ;;
			lsd) install_lsd ;;
			exa) install_exa ;;
			broot) install_broot ;;
			bat) install_bat ;;
			rg) install_rg ;;
			fd) install_fd ;;
			delta) install_delta ;;
			duf) install_duf ;;
			dust) install_dust ;;
			dua) install_dua ;;
			procs) install_procs ;;
			sd) install_sd ;;
			choose) install_choose ;;
			jq) install_jq ;;
			xh) install_xh ;;
			curlie) install_curlie ;;
			btm) install_btm ;;
			orgalorg) install_orgalorg ;;
			dive) install_dive ;;
			micro) install_micro ;;
			*) echo "UNKNOWN PACKAGE: $pkg" ;;
		esac
	done
else
	install_fzf
	install_lsd
	install_exa
	install_broot
	install_bat
	install_rg
	install_fd
	install_delta
	install_duf
	install_dust
	install_dua
	install_procs
	install_sd
	install_choose
	install_jq
	install_xh
	install_curlie
	install_btm
	install_orgalorg
	install_dive
	install_micro
fi
